package com.sql.azarias.base;


import android.content.Context;

import com.sql.azarias.http.AbstractRequestNew;
import com.sql.azarias.http.CallServer;
import com.sql.azarias.http.HttpListener;

public abstract class BasePresenter<T> {
    public T mView;

    public void attach(T mView){
        this.mView = mView;
    }
    protected <T> void request(Context activity, AbstractRequestNew<T> request, HttpListener<T> httpListener ) {
        CallServer.getInstance().add(activity,0, request, httpListener);
    }

    protected <T> void request(Context activity , int what, AbstractRequestNew<T> request, HttpListener<T> httpListener) {
        CallServer.getInstance().add(activity,what, request, httpListener);
    }
    public void dettach(){
        mView = null;
    }
}
